Skip to content

Fix service cancellation request fields - #3

Merged
sjmiller609 merged 1 commit into
mainfrom
hypeship/fix-cancellation-payload
Oct 5, 2026
Merged

sjmiller609 merged 1 commit into
mainfrom
hypeship/fix-cancellation-payload

Conversation

@sjmiller609

@sjmiller609 sjmiller609 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Send cancellation codes as reasonCode and optional explanatory text as reason, matching the Services API schema.
  • Preserve existing CLI flags and clarify their help text.
  • Add request-payload regression tests for predefined reasons and CANCEL_OTHER with detail.

Testing

  • go test ./...
  • go vet ./...

Note

Low Risk
Scoped CLI payload fix for service cancellation with regression tests; no auth or broad behavioral changes beyond correct API field names.

Overview
Aligns services cancel with the Services API by mapping --reason to JSON reasonCode and optional --reason-detail to reason (replacing the incorrect reason / reasonDetail fields).

CLI flag names are unchanged; help text now points users at cancellation-reasons and notes that detail is expected for CANCEL_OTHER. Adds TestServicesCancel to assert the POST body for a predefined code and for CANCEL_OTHER with free-text detail.

Reviewed by Cursor Bugbot for commit 9704260. Bugbot is set up for automated code reviews on this repo. Configure here.

@sjmiller609
sjmiller609 marked this pull request as ready for review October 5, 2026 19:47
@sjmiller609
sjmiller609 merged commit 3357ff6 into main Oct 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant